<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function updateObj(obj, myObj) {
            if (typeof myObj != "object") {
                return myObj;
            }
            if (myObj == null) {
                return myObj;
            }
            for (let key in myObj) {
                if(typeof myObj[key] != "object"){
                    obj[key] = myObj[key];
                } else {
                    obj[key] = {};
                    this.updateObj(obj[key], myObj[key]);
                }
            }
        }

 
        let children = [];
        let children1 = [
            {
                uuid: "uuid1",
                parent_id: "top1",
                style: {
                border: `1px solid #eee`,
                boxShadow: `inset 0px 0px 27px 3px ${this.boxShadowColor}`,
                overflow: "hidden"
                }
            },
            {
                uuid: "uuid2",
                parent_id: "top2",
                style: {
                border: `1px solid #eee`,
                boxShadow: `inset 0px 0px 27px 3px ${this.boxShadowColor}`,
                overflow: "hidden"
                }
            }
        ]
        console.log(children);
        updateObj(children, children1);
        console.log(children);

    </script>
</body>
</html>